import request from '../network/request'

const Api = {
    twPublishAdd: 'api/biz/tw_publish/add',
    twPublishEdit: 'api/biz/tw_publish/edit',
    twPublishMyPage: 'api/biz/tw_publish/myPage',
    twPublishDelete: 'api/biz/tw_publish/delete',
    twPublishPageApi: 'api/biz/tw_publish/pageApi',
    twPublishDetailApi: 'api/biz/tw_publish/detailApi',
    twPublishCollect: 'api/biz/tw_publish/collect',
    twPublishAudit: 'api/biz/tw_publish/audit',
 }

export const twPublishAudit=(data) =>{
    return request({
        url: Api.twPublishAudit,
        method: 'post',
        data: data,
        headers: {contentType: 'application/json;charset=UTF-8',loading:false}
    })
}
export const twPublishDelete=(id) =>{
    return request({
        url: Api.twPublishDelete,
        method: 'post',
        data: [{id:id}],
        headers: {contentType: 'application/json;charset=UTF-8',loading:true}
    })
}

export const twPublishCollect=(data) =>{
    return request({
        url: Api.twPublishCollect,
        method: 'post',
        data: data,
        headers: {contentType: 'application/x-www-form-urlencoded',loading:true}
    })
}


export const twPublishAdd=(data) =>{
    return request({
        url: Api.twPublishAdd,
        method: 'post',
        data: data,
        headers: {contentType: 'application/json;charset=UTF-8',loading:true}
    })
}




export const twPublishEdit=(data) =>{
    return request({
        url: Api.twPublishEdit,
        method: 'post',
        data: data,
        headers: {contentType: 'application/json;charset=UTF-8',loading:true}
    })
}




export const twPublishMyPage=(data) =>{
    return request({
        url: Api.twPublishMyPage,
        method: 'get',
        data: data,
        headers: {contentType: 'application/x-www-form-urlencoded',loading:false}
    })
}


export const twPublishDetailApi=(id) =>{
    return request({
        url: Api.twPublishDetailApi,
        method: 'get',
        data: {id:id},
        headers: {contentType: 'application/x-www-form-urlencoded',loading:true}
    })
}





export const twPublishPageApi=(data) =>{
    return request({
        url: Api.twPublishPageApi,
        method: 'get',
        data: data,
        headers: {contentType: 'application/x-www-form-urlencoded',loading:false}
    })
}



